1. Field of the Invention
The present invention relates to apparatus for generating a digital representation of an analog ac waveform, and more particularly to apparatus for generating a selected number of samples per cycle of ac waveforms of unknown or changing frequency.
2. Background of Information
Digital equipment which monitors and controls ac signals, require that the ac signals be digitized for use by the digital circuitry. In systems in which it can be assumed that the frequency of the ac signal remains constant, the signal is digitized by sampling the ac signal at fixed intervals of time. In some applications, it can not be assumed that the frequency remains constant. Typically in such cases, the frequency is periodically calculated by counting the number of zero crossings of the ac signal within a given time period. In some applications, the sampling interval is adjusted to accommodate for the change in frequency so that a common number of digitizing samples is taken per cycle of the ac waveform despite changes in the frequency. In other cases, the sampling interval remains fixed, and an accommodation is made in the software for the change in the number of samples per cycle resulting from a change in frequency. In U.S. patent applications Ser. No. 08/072,376 filed on Jun. 7, 1993, now U.S. Pat. No. 5,343,174 and 08/249,829 filed on May 26, 1994, the number of zero crossings in a time period set by a predetermined number of samples is used to determine whether a circuit interrupter is connected to a 50 Hz or 60 Hz source, and the appropriate fixed sampling interval for synchronously sampling at the appropriate frequency is selected. In this situation, it is accepted that the frequency of the connected signal is either 50 Hz or 60 Hz, and the time utilized to make the determination is not critical, as it is assumed that the source frequency is stable. In the exemplary embodiments of these systems, the number of zero crossings in about 1 second is used to determine the frequency for setting the sampling rate to one of two fixed values.
One application in which there can be a wide variation in the frequency of an ac signal is in transfer switches which control connection of a load to alternative power sources. In many cases, one of the alternative power sources is an emergency source powered by an internal combustion engine. The frequency of such a source will vary until rotational speed of the generator stabilizes, and even, then may wander about a nominal value. The transfer switch monitors this frequency, to make sure that the source that is connected to the load is within prescribed frequency limits. Even where the alternative power sources controlled by a transfer switch are both commercial sources, the transfer switch must monitor the frequencies to assure that they are within limits.
In applications where the frequency of the source varies, or the frequencies of multiple sources must be monitored, there is a need for a system for rapidly and accurately determining the frequency. There is a further need in such applications for a system which accurately and rapidly adjust the sampling rate, particularly where synchronous sampling is desired.